{include file="../app/common/admin/lib/header.html" title="用户管理"}
<div class="inner-center-box">
    <div class="page-header clearfix">
        <h2 class="left">活动管理<span>在这里对活动进行管理</span></h2>
        <a href="{:url('/user/adminuser')}" class="btn btn-default btn-sm right">&lt;&nbsp;返回关键字列表</a>
    </div>

    <!--start:用户新增-->
    <div class="add-form">
        <form class="js_creatForm"  action="{:url('user/admin_user/save')}" method="post" enctype="multipart/form-data">
            <input type="hidden" name="id" class="js_id" value="{$info.id}">
            <table class="table" cellpadding="0" cellspacing="0">
                <tr>
                    <th><label for="" class="add-f-label">回复关键词：</label></th>
                    <td>

                        <input name="info[user_name]"  value="{$info.user_name}" type="text" class="add-f-ipt1 js_userName">
                        <div class="tips"><span style="line-height: 34px;color: #f00;margin-right: 10px;">*</span>请输入回复关键词</div>
                    </td>
                </tr>

                <tr>
                    <th><label for="" class="add-f-label">标题：</label></th>
                    <td>
                        <input name="info[mobile]"  value="{$info.mobile}" type="text" class="add-f-ipt1 js_mobile">
                        <div class="tips">请输入标题</div>
                    </td>
                </tr>
                <tr>
                    <th><label for="" class="add-f-label">活动地址：</label></th>
                    <td>
                        <input name="info[email]"  value="{$info.email}" type="text" class="add-f-ipt1 js_email">
                        <div class="tips">请输入活动地址</div>
                    </td>
                </tr>
                <tr><th>&nbsp;</th><td class="noborder"><button type="submit" class="btn btn-success js_submit">&nbsp;&nbsp;&nbsp;确认&nbsp;&nbsp;&nbsp;</button></td></tr>
            </table>
        </form>
    </div>
</div>
{literal}
<script>
    $(function(){
        // 点击 表单提交按钮
        $('.js_submit').click(function(e){
            e.preventDefault();
            var userName = $('.js_userName').val();
            var pass   = $('.js_pass').val();
            var role   = parseInt($('.js_role').val());
            var id     = $('.js_id').val();
            var mobile = $.trim($('.js_mobile').val());
            var email  = $.trim($('.js_email').val());

            if ((id && pass) || (!id)) {
                var pattern = /^[a-zA-Z0-9]{5,14}$/;
                if (!pattern.test(pass)) {
                    showMsg('密码不符合规则');
                    return;
                }
            }
            if (!role) {
                showMsg('请选择角色');
                return;
            }

            $('.js_creatForm').submit();
        });

        // 上传图片预览
        $(".js_upFile").each(function(i){
            $(this).change(function(e){
                handleFileSelect($(this));
            });
        });
    });
</script>
{/literal}
{include file="../app/common/admin/lib/footer.html"}